class Api::V1::MicropostsController < Api::V1::BaseController
  def index
    user = User.find(params[:user_id])
    @microposts = paginate(user.microposts.select(:id, :title, :content, :user_id))
    api_success(data: @microposts)
  end
end
